'use client'

import React, { useState } from 'react'

export default function CTAForm() {
  const [email, setEmail] = useState('')

  const handleSubmit = (e: React.FormEvent) => {
    e.preventDefault()
    // localStorage.setItem('email', email)
    window.location.href = '/register'
  }

  return (
    <form onSubmit={handleSubmit} className="w-full max-w-2md mx-auto">
      <div className="flex gap-2 justify-center">
        {/* <input
          type="email"
          value={email}
          onChange={(e) => setEmail(e.target.value)}
          className="flex-1 px-4 py-2 border rounded-md"
          placeholder="输入您的邮箱"
          required
        /> */}
        <button
          type="submit"
          className="px-6 py-2 w-full bg-rose-600 text-white rounded-md hover:bg-rose-700"
        >
          立即注册
        </button>
      </div>
    </form>
  )
}